﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;

namespace Passwords.ValidationRules
{
    public class TextEmptyValidationRule : ValidationRule
    {
        public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
        {
            string text = value as string;
            return string.IsNullOrEmpty(text) ? new ValidationResult(false, "Please enter a name") : ValidationResult.ValidResult;
        }
    }
}
